<template>
 <nav class="navbar">
      <div class="logo">穷途旅行</div>
      <ul class="nav-links">
      <li><router-link to="/">首页</router-link></li>
      <li><router-link to="/add">我要发布</router-link></li>
      <li><router-link to="/now">环境监测</router-link></li>
        <li><router-link to="/profile">个人中心</router-link></li>
        <li><router-link to="/ranking">热度排行</router-link></li>
        <li><router-link to="/monthlyRecommendation">月份推荐</router-link></li>
        <li v-if="isLogin"><router-link to="/login">登录</router-link></li>
        <li v-else><router-link to="/login">退出登录</router-link></li>
      </ul>
    </nav>
</template>

<script setup lang="ts">
  const isLogin = ref(false);
</script>

<style scoped>
.navbar {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #1baeae;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links li {
  font-size: 16px;
}
</style>
